package day03;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class PokerCard implements Poker{

    private List<Card> list;

    public PokerCard() {
        list = new ArrayList<>();
        final String[] l = new String[]{"♠", "♥", "♦", "♣"};

        int weight = 0;
        for (String s : l) {
            for (int i = 1; i < 14; i++) {
                Card card = new Card(i, s);
                card.setWeight(weight);
                list.add(card);
            }
            weight++;
        }
    }

    public void shufflePoker() {
        System.out.println("---------洗牌开始---------");
        System.out.println(list);
        Collections.shuffle(list);
        System.out.println("---------洗牌结束---------");
    }

    public List<Card> getNewList() {
        return list;
    }
}
